import {createRouter, createWebHistory} from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/general/button',
        name: 'Button',
        component: () => import('../views/general/Button')
    },
    {
        path: '/general/icon',
        name: 'Icon',
        component: () => import('../views/general/Icon')
    },
    {
        path: '/layout/grid',
        name: 'Grid',
        component: () => import('../views/layout/Grid')
    },
    {
        path: '/layout/space',
        name: 'Space',
        component: () => import('../views/layout/Space')
    },
    {
        path: '/layout/layout1',
        name: 'Layout1',
        component: () => import('../views/layout/Layout1')
    },
    {
        path: '/layout/layout2',
        name: 'Layout2',
        component: () => import('../views/layout/Layout2')
    },
    {
        path: '/layout/layout3',
        name: 'Layout3',
        component: () => import('../views/layout/Layout3')
    },
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
